package com.sky.common.utils;

import java.util.Collection;

public class CollectionsUtil {

    public static boolean isNullOrEmpty(Collection<?> collection) {
        return collection == null || collection.isEmpty();
    }

    public static void main(String[] args) {
        Collection<String> list = null;

        if (isNullOrEmpty(list)) {
            System.out.println("集合为空或为 null");
        } else {
            System.out.println("集合不为空");
        }
    }
}
